import { createRouter, createWebHistory } from "vue-router";

import home from "../components/Home.vue";

const routes = [
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/home",
    name: "Home",
    component: home,
  },
  {
    path: "/reward",
    name: "Reward",
    component: () =>
      import(/* webpackChunkName: "reward" */ "../components/Reward.vue"),
  },
  {
    path: "/brand",
    name: "Brand",
    component: () =>
      import(/* webpackChunkName: "brand" */ "../components/Brand.vue"),
  },
  {
    path: "/infinite",
    name: "Infinite",
    component: () =>
      import(/* webpackChunkName: "infinite" */ "../components/Infinite.vue"),
  },
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
